package com.schrodinger.fruit;

public class FruitGardener {
	public static IFruit getFruit(FruitType ft) throws BadFruitException{
		 switch (ft) {    
	        case APPLE:    
	            return new Apple();  
	        case GRAPE:    
	        	return new Grape();
	        default :
	        	throw new BadFruitException("Bad fruit request");
		 }
		 
	}
}
